if A%1 == A goto usage

@if not exist \tmp\src md \tmp\src
@if not exist \tmp\src\parser md \tmp\src\parser

@copy src\parser\*.* \tmp\src\parser
@del /Q /F src\parser\*.*
@del /Q /F classes\parser\*.*

rem d:\j2sdk1.4.2_10\bin\java -cp "d:/javacc-4.0/bin/lib/javacc.jar" jjtree -OUTPUT_DIRECTORY=src/parser jj/%1

rem @if errorlevel == 1 goto finish

rem d:\j2sdk1.4.2_10\bin\java -cp "d:/javacc-4.0/bin/lib/javacc.jar" javacc -OUTPUT_DIRECTORY=src/parser -DEBUG_PARSER src/parser/%1.jj

d:\j2sdk1.4.2_10\bin\java -cp "d:/javacc-4.0/bin/lib/javacc.jar" javacc -OUTPUT_DIRECTORY=src/parser -DEBUG_PARSER jj/%1

rem d:\j2sdk1.4.2_10\bin\java -cp "d:/javacc-4.0/bin/lib/javacc.jar" javacc -OUTPUT_DIRECTORY=src/parser jj/%1

@if errorlevel == 1 goto finish

d:\j2sdk1.4.2_10\bin\javac -classpath classes -d classes src/dm/*.java src/parser/*.java src/util/*.java

@goto finish

:usage
@echo usage: build jj-file-name

:finish
